<cc:page type="normal" style="standard" showSidebar="false" showHeader="false" />
<cc>

   CCService cs = new CCService(userInfo);

   String key = request.getParameter("key") == null ? "": request.getParameter("key") + "";
   String sql = "";
   switch(key){
    case "qq":
       String xm = request.getParameter("xm") == null ? "": request.getParameter("xm") + "";
       sql ="select id value,name text from xmqq where zsxm = '"+ xm +"'";
       break;
    case "ld":
       String qq = request.getParameter("qq") == null ? "": request.getParameter("qq") + "";
       sql ="select ld value,ld text from fc where qq = '"+ qq +"' group by ld";
       break;
    case "fcqq":
       String fcqq = request.getParameter("qq") == null ? "": request.getParameter("qq") + "";
       sql ="select id,`name`,ld,fh,dy,cen,fczt,ktrgsl,yxfysl,bktrgsl,scjzmj,jzmj from fc where qq = '"+ fcqq +"' order by cen + 0 desc";
       break;
    case "fcld":
       String ldqq = request.getParameter("ldqq") == null ? "": request.getParameter("ldqq") + "";
       String ld = request.getParameter("ld") == null ? "": request.getParameter("ld") + "";
       sql ="select id,`name`,ld,fh,dy,cen,fczt,ktrgsl,yxfysl,bktrgsl,scjzmj,jzmj from fc where qq = '"+ ldqq +"' and ld = '"+ ld +"' order by cen + 0 desc";
       break;
    case "fj":
       String fjqq = request.getParameter("fjqq") == null ? "": request.getParameter("fjqq") + "";
       sql ="select id,`name` from tp_sys_attachement where related_id = '"+ fjqq +"' ";
       break;
    default:
       break;
   }
   // sql = "";
   List<CCObject> ncxmList = cs.cqlQuery("", sql);

   net.sf.json.JSONArray js = net.sf.json.JSONArray.fromObject(ncxmList);   
   request.setAttribute("jsonmsg", js.toString());
</cc>
<cc:forward page="/platform/activity/task/getNodes.jsp"/>